<h1>Listing budgets</h1>

<table>
  <tr>
    <th>Account</th>
    <th>Category</th>
    <th>Amount</th>
    <th></th>
    <th></th>
    <th></th>
  </tr>

<% @budgets.each do |budget| %>
  <tr>
    <td><%= budget.account_id %></td>
    <td><%= budget.category.name %></td>
    <td><%= budget.amount %></td>
    <td><%= link_to 'Show', budget %></td>
    <td><%= link_to 'Edit', edit_budget_path(budget) %></td>
    <td><%= link_to 'Destroy', budget, confirm: 'Are you sure?', method: :delete %></td>
  </tr>
<% end %>
</table>

<br />

<%= link_to 'New Budget', new_budget_path %>
